package com.twu.biblioteca.Library;

public class Movie {

    private String name;
    private String director;
    private int year;
    private Integer rating;
    private boolean available;
    private String Borrower;

    private final Integer MINIMUM_RATING = 1;
    private final Integer MAXIMUM_RATING = 10;

    public Movie(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public Integer getRating() {
        return rating;
    }

    public void setRating(Integer rating) {
        if (rating >= MINIMUM_RATING && rating <= MAXIMUM_RATING) {
            this.rating = rating;
        }
    }

    public boolean isAvailable() {
        return available;
    }

    public void setAvailable(boolean available) {
        this.available = available;
    }

    public String getBorrower() {
        return Borrower;
    }

    public void setBorrower(String borrower) {
        Borrower = borrower;
    }
}
